import { Tools } from 'weaver-mobile';
import { catchApiError } from '../util/index';
import { PARAMS } from '../components/public/BlogUtils';

// 我的报表
export const getMyBlogReport = params => {
	let options = {
		method: 'GET',
		url: '/api/blog/report/getMyBlogReport',
		params: {...PARAMS, ...params}
	};
	return Tools.callApi(options).then(catchApiError);
}

// 关注报表
export const getAttentionReport = params => {
	let options = {
		method: 'GET',
		url: '/api/blog/report/getAttentionReport',
		params: {...PARAMS, ...params}
	};
	return Tools.callApi(options).then(catchApiError);
}

// 获取自定义报表
export const getDefReport = params => {
	let options = {
		method: 'GET',
		url: '/api/blog/report/getTempReportTableInfo',
		params: {...PARAMS, ...params}
	};
	return Tools.callApi(options).then(catchApiError);
}
// 关注报表api/blog/report/getMyBlogReportList
export const getMyBlogReportList = params => {
	let options = {
		method: 'GET',
		url: '/api/blog/report/getMyBlogReportList',
		params: {...PARAMS, ...params}
	};
	return Tools.callApi(options).then(catchApiError);
}
